const USER_NAME = 'userName';
const PASSWORD = 'password';
import { Base64 } from 'js-base64';

export function getStorageUserName() {
    let name = localStorage.getItem(USER_NAME);
    return Base64.decode(name);
}

export function setStorageUserName(val) {
    let name = Base64.encode(val);
    localStorage.setItem(USER_NAME, name);
}

export function getStoragePassword() {
    let pwd = localStorage.getItem(PASSWORD);
    return Base64.decode(pwd);
}

export function setStoragePassword(val) {
    let pwd = Base64.encode(val);
    localStorage.setItem(PASSWORD, pwd);
}
